import request from '@/utils/request'

// 查询客户信息列表
export function listCustomer(query) {
  return request({
    url: '/buss/customer/queryCustomerList',
    method: 'get',
    params: query
  })
}

// 查询客户信息详细
export function getCustomer(id) {
  return request({
    url: '/buss/customer/' + id,
    method: 'get'
  })
}

// 查询任务
export function queryPlanNew(query) {
  return request({
    url: '/buss/customQuery/queryPlanNew',
    method: 'get',
    params: query
  })
}

// 新增任务
export function addPlanNew(data) {
  return request({
    url: '/buss/customQuery/addPlanNew',
    method: 'get',
    params: data
  })
}

// 查询任务
//   return request({
//     url: '/buss/customQuery/queryResultNew',
//     method: 'get',
//     params: data
//   })
// }

// 新增客户信息
export function addCustomer(data) {
  return request({
    url: '/buss/customer/addCustomer',
    method: 'post',
    data: data
  })
}

// 修改客户信息
export function updateCustomer(data) {
  return request({
    url: '/buss/customer',
    method: 'put',
    data: data
  })
}

// 删除客户信息
export function delCustomer(id) {
  return request({
    url: '/buss/customer/' + id,
    method: 'delete'
  })
}

// 删除客户信息
export function deletePlanNew(data) {
  return request({
    url: '/buss/customQuery/deletePlanNew',
    method: 'post',
    data: data
  })
}

// 导出任务
export function exportQtbqService(data) {
  return request({
    url: '/buss/customQuery/exportZdycxService',
    method: 'post',
    data: data
  })
}

// 客户视图
export function queryCustomerInfo(idCard) {
  return request({
    url: '/buss/customer/queryCustomerInfo/' + idCard,
    method: 'get'
  })
}
